package org.sean.framework.test.canary.feign;

import org.sean.framework.canary.event.CanaryServerEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
public class CanaryEvent {

    private String serverLabel;

    @EventListener(CanaryServerEvent.class)
    public void onCanaryServerEvent(CanaryServerEvent event) {
        serverLabel = event.getLabel();
    }

    public String getServerLabel() {
        return serverLabel;
    }
}
